﻿@namespace SwashbucklerDiary.Components

<div class="@($"my-first-launch-card {(Show?"":"d-none")}")">
    <MList Class="@($"my-first-launch-list {(SelectedLanguage?"d-none":"")}")">
        <MListItemGroup Value="0"
                        Mandatory="true"
                        Color="indigo">
            @foreach (var item in Languages)
            {
                <MListItem OnClick="()=>SetLanguage(item.Value)">
                    <MListItemContent>
                        <MListItemTitle>
                            @(item.Key)
                        </MListItemTitle>
                    </MListItemContent>
                </MListItem>
            }
        </MListItemGroup>
    </MList>
</div>

<MDialog Value="SelectedLanguage && Show"
         MaxWidth="420">
    <MCard Rounded="@("lg")">
        <MCardTitle Class="font-weight-bold justify-center">
            @(I18n.T("AgreementAndPolicy.Title"))
        </MCardTitle>
        <MCardText Class="pb-0">
            <MMarkdownIt Source="@(I18n.T("AgreementAndPolicy.Content"))"></MMarkdownIt>
        </MCardText>
        <MCardActions>
            <MButton Class="flex-grow-1"
                     Text="true"
                     Rounded="true"
                     OnClick="OnDisagree">
                @(I18n.T("AgreementAndPolicy.Disagree"))
            </MButton>
            <MButton Class="flex-grow-1"
                     Dark="true"
                     Rounded="true"
                     Color="primary"
                     OnClick="OnArgee">
                @(I18n.T("AgreementAndPolicy.Agree"))
            </MButton>
        </MCardActions>
    </MCard>
</MDialog>
